<script>
  export default {
    name: 'gapbar',
    props: {
      title: {
        type: String,
        default: () => '',
      },
      showRight: {
        type: Boolean,
        default: () => true,
      },
    },
    methods: {
      elementClick() {
        this.$emit('elementClick');
      },
    },
  };
</script>

<template>
  <view class="gapbar flex justify-between" @click.stop="elementClick">
    <view class="left ml_20 mt_20 mb_20 flex  align-center" style="white-space: nowrap">
      {{ title }}
    </view>
    <view class="right flex align-center ml_20 mr_20 mt_20 mb_20">
      <view class="content mr_10">
        <slot name="content"></slot>
      </view>
      <text class="iconfont icon-ic_rightarrow fs_26" v-if="showRight"></text>
    </view>
  </view>
</template>

<style scoped lang="scss">
  .gapbar {
    width: 702rpx;
    //min-height: 80rpx;
    background: #FFFFFF;
    border-radius: 15rpx 15rpx 15rpx 15rpx;

    .left {
      font-family: PingFang SC, PingFang SC;
      font-weight: 500;
      font-size: 30rpx;
      color: #4B4B4B;
    }
  }
</style>